var assert = require('assert');
var should = require('should');
var util = require('util');
var _ = require('lodash');
var unionTaskModel = require('../../app/models/unionTaskModel.js');
var config = require('../config');
var unionMissionConf = require('../../app/config/unionMissionConf.js');

suite('测试unionTaskModel', function () {
    var union_model;
    setup(function (done) {
        unionTaskModel.getByRoleId(10435, function (err, model) {
            assert.equal(err == null, true);
            union_model = model;
            union_model.toJSON();
            done();
        });
    });

    suite('getTotalStar', function () {
        test('每日完成任务总星数', function (done) {
            // union_model.addDonated(2, 12, 5000);
            union_model.addStarRecord(10);
            // console.log(union_model.donated_list);
            union_model.save(done);
        });
    });

    suite('5点刷新', function () {
        test('5点刷新', function (done) {
            unionTaskModel.onFiveRefresh(union_model, function (err) {
                union_model.save(done);
            });
        });
    });
});
